import request from '@/utils/request'


export function list(query) {
  return request({
    url: '/admin/goods/list',
    method: 'get',
    params: query
  })
}

export function getById(id) {
  return request({
    url: '/admin/goods/getById?id='+id,
    method: 'get'
  })
}

export function delById(id) {
  return request({
    url: '/admin/goods/delById?id='+id,
    method: 'get'
  })
}

export function updateStatus(id,status) {
  const data = {
    id,
    status
  };
  return request({
    url: '/admin/goods/updateStatus',
    method: 'post',
   data: data
  })
}

// 新增用户 --无鉴权
 export function save(data) {
   return request({
     url: '/admin/goods/save',
     method: 'post',
     data: data
   })
 }



